<script setup>
import { inject } from 'vue';
const money = inject('money')
const changeMoney = inject('changeMoney')
</script>

<template>
    <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
        child 组件---{{ money }}
        <button @click="changeMoney">存钱</button>
    </div>
</template>